{% extends "admin/base_site.html" %}

{% load i18n %}
{% load admin_urls %}
{% load breadcrumbs %}

{% block breadcrumb-list %}
{% add_crumb 'Home' '/' %}
{% url 'admin:index' as admin_index %}
{% add_crumb 'Administration' admin_index %}
{% url 'admin:app_list' app_label=opts.app_label as app_list %}
{% add_crumb app_label|capfirst|escape app_list %}
{% add_crumb opts.verbose_name_plural|capfirst opts|admin_urlname:'changelist' %}
{% url opts|admin_urlname:'change' object.pk|admin_urlquote as object_url %}
{% add_crumb object|truncatewords:"18" object_url %}
{% add_crumb 'History' %}
{% endblock %}

{% block content %}
{% if action_list %}
<table id="change-history">
    <thead>
    <tr>
        <th scope="col">{% trans 'Date/time' %}</th>
        <th scope="col">{% trans 'User' %}</th>
        <th scope="col">{% trans 'Action' %}</th>
    </tr>
    </thead>
    <tbody>
    {% for action in action_list %}
    <tr>
        <th scope="row">{{ action.action_time|date:"DATETIME_FORMAT" }}</th>
        <td>{{ action.user.get_username }}{% if action.user.get_full_name and action.user.get_username != action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %}</td>
        <td>{{ action.change_message }}</td>
    </tr>
    {% endfor %}
    </tbody>
</table>
{% else %}
<div class="messages">
    <ul>
        <li class="info">{% trans "This object doesn't have a change history. It probably wasn't added via this admin site." %}</li>
    </ul>
</div>
{% endif %}
{% endblock %}
